import request from '@/utils/request';

export async function GetRoleByPage(params: any) {
  return request('/api/system/getRoleByPage', {
    method: 'POST',
    data: params,
  });
}

export async function GetPermissionTreeByRole(params: any) {
  return request('/api/system/getPermissionTreeByRole', {
    method: 'POST',
    data: params,
  });
}

export async function GetPermissionById(params: any) {
  return request('/api/system/getPermissionById', {
    method: 'POST',
    data: params,
  });
}

export async function addRole(params: any) {
  return request('/api/system/addRole', {
    method: 'POST',
    data: params,
  });
}

export async function updateRole(params: any) {
  return request('/api/system/updateRole', {
    method: 'POST',
    data: params,
  });
}

export async function delRole(params: any) {
  return request('/api/system/delRole', {
    method: 'POST',
    data: params,
  });
}

export async function saveMenus(params: any) {
  return request('/api/system/saveMenus', {
    method: 'POST',
    data: params,
  });
}
